/***************************************************************************
 *   Copyleft 2008-2009 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>									   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#include "./vGlExtensionManager.h"
#include "Gl/glew.h"

namespace Vendetta {
	// --------------------------------------------------
	//	Construct
	// --------------------------------------------------

	vGlExtensionManager::vGlExtensionManager() {
		mExtensions<<vPair<vString, vBool>("GL_ARB_vertex_buffer_object", false);
		//mExtensions<<vPair<vString, vBool>("GL_ARB_vertex_buffer_object", false);
	}

	// --------------------------------------------------
	//	Destruct
	// --------------------------------------------------

	vGlExtensionManager::~vGlExtensionManager() {
		mExtensions.Clear();
	}

	// --------------------------------------------------
	//	supports
	// --------------------------------------------------

	vBool vGlExtensionManager::Supports(const vString& GLExtension) {
		return glewIsSupported(GLExtension.ToConstCharPtr()) ? true : false;
	}
}